﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using Alicanto;

namespace Alicanto.Example
{
    class Program
    {
        static void Main(string[] args)
        {
            Settings.CONTEXT = typeof(Program);
            Settings.BEGIN_CODE = "{%";
            Settings.END_CODE = "%}";

            string src = File.ReadAllText("test.alc");

            Question q = new Question();
            q.text = "haiyang";
            q.answers = new List<Answer>();
            q.answers.Add(new Answer(0, "water erbij?"));
            q.answers.Add(new Answer(1, "sambal bij?"));

            Template<Question> template = new Template<Question>(src);
            string result = template.Run(q);

            Console.WriteLine(result);
            Console.ReadLine();
        }

        class Question
        {
            public string text;
            public IList<Answer> answers;
        }

        class Answer
        {
            public int index;
            public string text;

            public Answer(int index, string text)
            {
                this.index = index;
                this.text = text;
            }
        }
    }
}
